-- This script was generated by the Schema Diff utility in pgAdmin 4
-- For the circular dependencies, the order in which Schema Diff writes the objects is not very sophisticated
-- and may require manual changes to the script to ensure changes are applied in the correct order.
-- Please report an issue for any failure with the reproduction steps.

CREATE TABLE IF NOT EXISTS public.cache_hits
(
    created_at timestamp with time zone NOT NULL DEFAULT now(),
    request_id uuid NOT NULL,
    CONSTRAINT cache_hits_pkey PRIMARY KEY (created_at, request_id),
    CONSTRAINT cache_hits_request_id_fkey FOREIGN KEY (request_id)
        REFERENCES public.request (id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.cache_hits
    OWNER to postgres;

ALTER TABLE IF EXISTS public.cache_hits
    ENABLE ROW LEVEL SECURITY;

GRANT ALL ON TABLE public.cache_hits TO anon;

GRANT ALL ON TABLE public.cache_hits TO authenticated;

GRANT ALL ON TABLE public.cache_hits TO postgres;

GRANT ALL ON TABLE public.cache_hits TO service_role;
